package gulimall.constant;

/**
 * @author HLF
 * @date 2022/5/6 17:11
 * 定义商品模块用到的常量
 */
public class ProductConstant {
    public enum AttrEnum{
        ATTR_TYPE_BASE(1,"规格参数"),
        ATTR_TYPE_SALE(0,"销售属性");

        private final int code;
        private final String msg;

        AttrEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

    /**
     * spu上架状态枚举
     */
    public enum StatusEnum{
        SPU_NEW(0,"新建"),
        SPU_UP(1,"已上架"),
        SPU_DOWN(2,"已下架");

        private final int code;
        private final String msg;

        StatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }
}
